
//1-100轮进行关灯

import java.util.Arrays;

public class Test01 {

    public static boolean[]  getFun(int x,int y,boolean[] arr){
        int tmp = y;
        for(int i = 0;i<arr.length;i++){
            if(x+y>=arr.length){
                arr[x] = !arr[x];
                return arr;
            }
            arr[x+y] =!arr[x+y];

            y+=tmp;
        }

        return arr;
    }
    public static void main(String[] args) {
        boolean[] arr = new boolean[100];
        int j =1;
        for(int i =0;i<100;i++){
            getFun(i,j,arr);
            j++;
            System.out.println("1111");
        }
        System.out.println(Arrays.toString(arr));
    }
}
